package com.tidc.seaserverservice.service;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.tidc.seaservermodel.dto.HistogramDto;
import com.tidc.seaservermodel.entity.Fres;
import com.tidc.seaservermodel.entity.Task;
import com.tidc.seaservermodel.entity.UserTask;
import com.tidc.seaservermodel.exception.TidcAuthorityException;
import com.tidc.seaservermodel.exception.TidcBadParent;
import org.apache.ibatis.annotations.Param;
import org.springframework.security.core.Authentication;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

/**
 * @author ：冯涛滔
 * @date ：Created in 2020/9/12 16:12
 * @description：
 * @modified By：
 * @version:
 */
public interface SupervisorTaskService {
    Fres<Integer> addTask(Task task, Authentication authentication) throws SQLException, TidcAuthorityException;
    Fres<Map<Object, Object>> getTaskAll(String query,int pageSize, int pageNum,Authentication authentication) throws TidcAuthorityException, TidcBadParent;
    Fres<Map<Object, Object>> getAuditList(int id,int pageSize,int pageNum,Authentication authentication) throws TidcBadParent;
    Fres<List<HistogramDto>> getWithinTaskInfo(int day, int id, Authentication authentication);
    Fres<String> finishSecondaryTask(UserTask userTask, Authentication authentication) throws TidcAuthorityException, SQLException, JsonProcessingException;
    Fres<String> alterTask(Task task,Authentication authentication) throws TidcAuthorityException, SQLException;

}
